package com.ruoyi.subject.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.subject.mapper.SubjectCategoryMapper;
import com.ruoyi.subject.domain.SubjectCategory;
import com.ruoyi.subject.service.ISubjectCategoryService;

/**
 * 课题分类Service业务层处理
 * 
 * @author yepanpan
 * @date 2021-03-15
 */
@Service
public class SubjectCategoryServiceImpl implements ISubjectCategoryService 
{
    @Autowired
    private SubjectCategoryMapper subjectCategoryMapper;

    /**
     * 查询课题分类
     * 
     * @param id 课题分类ID
     * @return 课题分类
     */
    @Override
    public SubjectCategory selectSubjectCategoryById(Long id)
    {
        return subjectCategoryMapper.selectSubjectCategoryById(id);
    }

    /**
     * 查询课题分类列表
     * 
     * @param subjectCategory 课题分类
     * @return 课题分类
     */
    @Override
    public List<SubjectCategory> selectSubjectCategoryList(SubjectCategory subjectCategory)
    {
        return subjectCategoryMapper.selectSubjectCategoryList(subjectCategory);
    }

    /**
     * 新增课题分类
     * 
     * @param subjectCategory 课题分类
     * @return 结果
     */
    @Override
    public int insertSubjectCategory(SubjectCategory subjectCategory)
    {
        return subjectCategoryMapper.insertSubjectCategory(subjectCategory);
    }

    /**
     * 修改课题分类
     * 
     * @param subjectCategory 课题分类
     * @return 结果
     */
    @Override
    public int updateSubjectCategory(SubjectCategory subjectCategory)
    {
        return subjectCategoryMapper.updateSubjectCategory(subjectCategory);
    }

    /**
     * 批量删除课题分类
     * 
     * @param ids 需要删除的课题分类ID
     * @return 结果
     */
    @Override
    public int deleteSubjectCategoryByIds(Long[] ids)
    {
        return subjectCategoryMapper.deleteSubjectCategoryByIds(ids);
    }

    /**
     * 删除课题分类信息
     * 
     * @param id 课题分类ID
     * @return 结果
     */
    @Override
    public int deleteSubjectCategoryById(Long id)
    {
        return subjectCategoryMapper.deleteSubjectCategoryById(id);
    }
}
